﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using OSharp.Core.Data;

namespace OSharp.Demo.Models.System
{
    public class DictType : EntityBase<Guid>, IRecyclable
    {
        /// <summary>
        /// 编码
        /// </summary>
        [Required, StringLength(50)]
        public string Code { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [Required, StringLength(100)]
        public string Name { get; set; }
        
        /// <summary>
        /// 子项
        /// </summary>
        public virtual ICollection<DictItem> Item { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [StringLength(500)]
        public string Remark { get; set; }

        public bool IsDeleted { get; set; }
    }
}
